package com.bestcem.xm.common.core.constant;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * 资源错误码 仿照python
 * app/errors.py/AppRequestError
 *
 * @author yf.wang <yf.wang@idiaoyan.com>
 * @version V1.0
 * @date 2021/8/4
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class AppRequestErrorCode {
    public static final Integer CODE_MIN = 0;

    /**
     * Token缺失
     */
    public static final Integer TOKEN_LOST = CODE_MIN + 2;

    /**
     * 签名错误
     */
    public static final Integer SIGN_ERROR = CODE_MIN + 3;

    /**
     * 参数缺失
     */
    public static final Integer PARAM_LOST = CODE_MIN + 4;

    /**
     * 参数格式错误
     */
    public final static Integer PARAM_FORMAT = CODE_MIN + 5;

    /**
     * 无效Token
     */
    public static final Integer INVALID_TOKEN = CODE_MIN + 6;

    /**
     * 参数超出合法范围
     */
    public static final Integer PARAM_RANGE = CODE_MIN + 7;

    /**
     * 禁用参数
     */
    public static final Integer PARAM_FORBIDDEN = CODE_MIN + 11;
}
